import request from '@/utils/request'
export const reqInsertOrUpdate = (good) => request({
  url: '/Goods/insertOrUpdate',
  method: 'post',
  data: good
})

// 管理员获取所有评论列表
export const reqmessageByPage = (pageParams, comment) => request({
  url: '/Goods/messageByPage',
  method: 'post',
  data: {
    page: pageParams.page,
    pageSize: pageParams.pageSize,
    user: comment.usersName,
    name: comment.name,
    unit: comment.unit,
    species: comment.species
  }
})
export const reqmessageByPageUser = (pageParams, comment) => request({
  url: '/Goods/messageByPage',
  method: 'post',
  data: {
    page: pageParams.page,
    pageSize: pageParams.pageSize,
    name: comment.name,
    unit: comment.unit,
    species: comment.species
  }
})
// 下架
export const reqshelfById = (good) => request({
  url: '/Goods/shelfById',
  method: 'post',
  data: good
})
// 物理删除
export const reqdeleteById = (good) => request({
  url: '/Goods/deletedById',
  method: 'post',
  data: good
})

